@import "../css/variables";

footer {
  font-size: $font-size-small;
  padding-top: 3rem;
  padding-bottom: 4rem;
  background-color: $gray-100;
  border-top: 1px solid $gray-300;
  margin-top: 1rem;
  color: $gray-600;

  h5 {
    font-size: 1rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: $gray-800;
    text-transform: uppercase;
  }

  ul {
    padding: 0;
    list-style: none;
    line-height: 2;
  }

  a {
    color: $gray-600;
  }

  .footer-logo img, .footer-copyright-eclipse-logo img {
    filter: grayscale(100);
    opacity: 0.5;
    transition: all $button-transition-time $button-transition-ease;

    &:hover {
      filter: grayscale(0);
      opacity: 1;
    }
  }

  .footer-nav-section {
    display: flex;
    flex-direction: row;
    margin-bottom: 6rem;

    .footer-logo {
      margin-top: 0.4rem;

      img {
        width: 8.3rem;
      }
    }

    .footer-nav-list {
      width: 20%;
    }
  }

  .footer-copyright {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;

    a {
      white-space: nowrap;
    }

    .footer-copyright-eclipse-logo {
      width: 17%;
      margin-bottom: 0.5rem;
    }
  }

  @media (max-width: $xl) {
    .footer-copyright {
      .footer-copyright-break {
        display: none;
      }

      .footer-copyright-eclipse-logo {
        width: 30%;
      }
    }
  }

  @media (max-width: $lg) {
    .footer-nav-section {
      .footer-nav-list {
        width: 25%;
      }
    }

    .footer-copyright {
      .footer-copyright-break {
        display: inline-block;
      }

      .footer-copyright-eclipse-logo {
        width: 40%;
      }
    }
  }

  @media (max-width: $md) {
    .footer-nav-section {
      max-width: 100%;
      margin-left: auto;
      margin-right: auto;
    }
  }

  @media (max-width: $sm) {
    .footer-nav-section {
      max-width: 80%;
      margin-bottom: 3rem;
      flex-direction: column;

      h5 {
        cursor: pointer;

        &::after {
          display: inline-block;
          content: "";
          border-top: 0.4em solid;
          border-right: 0.4em solid transparent;
          border-bottom: 0;
          border-left: 0.4em solid transparent;
          position: absolute;
          top: 0.75rem;
          right: 0;
        }
      }

      .footer-nav-list {
        width: 100%;
        position: relative;

        ul {
          overflow-y: hidden;
          max-height: 0;
          transition: all 200ms ease-in-out;

          &.visible {
            margin-bottom: $spacer * 2;
          }
        }
      }

      .footer-logo {
        margin: 0 auto 3rem auto;
        width: auto;
      }
    }

    .footer-copyright {
      max-width: 80%;
      text-align: center;
      margin-left: auto;
      margin-right: auto;
      flex-direction: column-reverse;

      .footer-copyright-eclipse-logo {
        width: 7.6rem;
        margin-bottom: 1rem;
      }
    }
  }
}
